#!/bin/bash
OK=0
WARN=1
CRITICAL=2
UNKNOWN=3
PATH="/bin:/sbin:/usr/bin:/usr/sbin"

Puppet_stat=`/etc/init.d/puppet status |awk '{print $5}'`

if [ "$Puppet_stat" == "running..." ]
then
	echo "puppet agent is running"
	exit $OK
else
	echo "puppet agent is stopped.you may need service puppet start"
	exit $CRITICAL
fi
